<extend name="Public/frame" />
<block name="content-box">

    <div style="padding:5px;">
        <div class="row">
            <div class="col-md-6">

                <div class="panel panel-primary">
                    <div class="panel-heading">
                        {$Think.lang.server_info}
                    </div>
                    <div class="panel-body" style="height:200px;overflow:auto;">
                        <p><b>{$Think.lang.version}:</b> v{$Think.const.APP_VERSION}</p>
                        <p><b>{$Think.lang.os}:</b> {$Think.const.PHP_OS}</p>
                        <p><b>{$Think.lang.php_version}:</b> {$Think.const.PHP_VERSION}</p>
                        <p><b>upload_max_filesize:</b> <?php echo ini_get ( 'upload_max_filesize' ); ?></p>
                        <p><b>post_max_size:</b> <?php echo ini_get ( 'post_max_size' ); ?></p>
                    </div>
                </div>

            </div>
            <div class="col-md-6">


                <div class="panel <if condition="$system_safe">panel-primary<else />panel-danger</if>">
                    <div class="panel-heading">
                        {$Think.lang.system_safety}
                    </div>
                    <div class="panel-body" style="height:200px;overflow:auto;">

                        <if condition="$system_safe">
                            <p class="text-success"><span class="glyphicon glyphicon-ok-sign"></span> {$Think.lang.system_safe}</p>
                        </if>

                        <if condition="$danger_file_admin">
                            <p class="text-danger"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.danger_file_admin}</p>
                        </if>
                        <if condition="$weak_setting_db_password">
                            <p class="text-danger"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.weak_setting_db_password}</p>
                        </if>
                        <if condition="$weak_setting_admin_password">
                            <p class="text-danger"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.weak_setting_admin_password}</p>
                        </if>
                        <if condition="$weak_setting_admin_last_change_password">
                            <p class="text-warning"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.weak_setting_admin_last_change_password}</p>
                        </if>
                        <if condition="$danger_file_install">
                            <p class="text-warning"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.danger_file_install}</p>
                        </if>
                        <if condition="$danger_file_publish">
                            <p class="text-warning"><span class="glyphicon glyphicon-info-sign"></span> {$Think.lang.danger_file_publish}</p>
                        </if>

                    </div>
                </div>

            </div>


            <div class="col-md-6">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        {$Think.lang.upload_setting}
                    </div>
                    <table class="table">
                        <tbody>
                        <tr>
                            <td class="text-right" style="width:12em">{$Think.lang.IMAGE_MAX_SIZE}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.IMAGE_MAX_SIZE|byte_format}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.IMAGE_ALLOW_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.IMAGE_ALLOW_EXT|join=', ',###}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.SCRAWL_MAX_SIZE}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.SCRAWL_MAX_SIZE|byte_format}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.CATCHER_MAX_SIZE}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.CATCHER_MAX_SIZE|byte_format}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.CATCHER_ALLOW_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.CATCHER_ALLOW_EXT|join=', ',###}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.VIDEO_MAX_SIZE}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.VIDEO_MAX_SIZE|byte_format}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.VIDEO_ALLOW_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.VIDEO_ALLOW_EXT|join=', ',###}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.FILE_MAX_SIZE}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.FILE_MAX_SIZE|byte_format}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.FILE_ALLOW_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.FILE_ALLOW_EXT|join=', ',###}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.IMAGE_LIST_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.IMAGE_LIST_EXT|join=', ',###}</td>
                        </tr>
                        <tr>
                            <td class="text-right">{$Think.lang.FILE_LIST_EXT}:</td>
                            <td>{$Think.config.ADMIN_UPLOAD.FILE_LIST_EXT|join=', ',###}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>

            </div>


            <div class="col-md-6">

                <?php
                if(file_exists($file='./app/Common/Custom/admin_system_info_panel.php')){
                    include $file;
                }
                ?>

                <div class="panel panel-default">
                    <div class="panel-heading">
                        {$Think.lang.maintain}
                    </div>

                    <table class="table">
                        <tbody>
                            <tr>
                                <td colspan="2">
                                    <if condition="access_permit('maintain')">
                                        <a href="{:U('System/maintain?action=download_log')}" target="_blank" class="btn btn-default">{$Think.lang.download_log}</a>
                                        <a href="{:U('System/maintain?action=view_log')}" target="_blank" class="btn btn-default">查看日志</a>
                                        <a href="#" onclick="admin_ajax_request('{:U('System/maintain?action=clear_log')}');" class="btn btn-default">{$Think.lang.clear_log}</a>
                                    </if>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    {$Think.lang.log_size} : {$log_size|byte_format}
                                </td>
                                <td>
                                    {$Think.lang.log_file_cnt} : {$log_file_cnt}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>

                <div class="panel panel-default">
                    <div class="panel-heading">
                        {$Think.lang.cron}
                    </div>

                    <table class="table">
                        <thead>
                        <tr>
                            <th>{$Think.lang.name}</th>
                            <th>{$Think.lang.last_execute}</th>
                            <th>{$Think.lang.cron_interval}</th>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="crons" item="v">
                            <tr>
                                <td>{$v.0}</td>
                                <td>{$v.2}</td>
                                <td>{$v.1}</td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>

            </div>



        </div>
    </div>

</block>